package com.queming.service.user;

import com.queming.core.dto.TokenRequest;
import com.queming.core.dto.UserCreateDto;
import com.queming.core.dto.UserDto;
import com.queming.core.dto.UserUpdateDto;
import com.queming.core.entity.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.security.core.userdetails.UserDetailsService;

/**
 * @author 陈词调
 * @date 2022/4/17
 */

public interface UserService extends UserDetailsService {


    Page<UserDto> search(Pageable pageable);

    UserDto create(UserCreateDto userCreateDto);

    @Override
    User loadUserByUsername(String username) ;



    UserDto get(String id);

    UserDto update(String id, UserUpdateDto userUpdateDto);

    void delete(String id);

    String createToken(TokenRequest tokenRequest);


    UserDto getCurrentUser();
}
